package com.vmware2.vim25.mo.samples.datacenter;

import com.vmware.vim25.mo.Folder;
import com.vmware.vim25.mo.ServiceInstance;

import java.net.MalformedURLException;
import java.net.URL;
import java.rmi.RemoteException;

/**
 * @projectName: learn_used_code
 * @packageName: com.vmware2.vim25.mo.samples.datacenter
 * @className: com.vmware2.vim25.mo.samples.datacenter-> CreateDataCenter
 * @createDate: 2021-12-15 11:23
 * @author: ZhangSheng
 * @version: 1.0
 * @description:
 */
public class CreateDataCenter {


    public static void main(String[] args) throws MalformedURLException, RemoteException {
        ServiceInstance si = new ServiceInstance(new URL("https://192.168.157.2:443/sdk"), "administrator@vsphere.local", "Admin@123", true);
        Folder rootFolder = si.getRootFolder();
        rootFolder.createDatacenter("ZSTestDataCenter");
    }
}
